
/*
 * @Descripttion: your project
 * @version: 1.0
 * @Author: hongweixun
 * @Date: 2023-05-17 13:50:32
 * @LastEditors: liyin 2179253556@qq.com
 * @LastEditTime: 2025-08-27 17:48:13
 */
import { createApp } from 'vue'
// 引入pinia
import { createPinia } from 'pinia'
// 引入pinia持久化插件
import PiniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import './assets/global.scss'
// 导入封装的util工具类
import Util from './util/util'
import CountTo from './components/Common/CountTo.vue'
// 引入iconfont
import './assets/fonts/iconfont.js'
import './assets/fonts/iconfont.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 引入Elmessage和Elloading的css样式文件
import 'element-plus/theme-chalk/el-loading.css'
import 'element-plus/es/components/message-box/style/index'
import 'element-plus/theme-chalk/el-message.css'
// 引入footer
import Footer from './components/Common/Footer.vue'
// svg 组件
import SvgIconVue from './components/Common/SvgIcon.vue'
// 引入title
import Title from './components/Common/Title.vue'
import TitleTwo from './components/Common/TitleTwo.vue'
// 取数据
import NoDate from './components/Common/NoDate.vue'
import router from './router'
import App from './App.vue'


// 注册pinia
const pinia = createPinia()
// 使用持久化插件
pinia.use(PiniaPluginPersistedstate)
const app = createApp(App)
app.component('Footer', Footer)
app.component('SvgIcon', SvgIconVue)
app.component('Title', Title)
app.component('TitleTwo', TitleTwo)
app.component('NoDate', NoDate)
app.component('CountTo', CountTo)
// 全局注册使用util类
app.config.globalProperties.$util = Util
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus, {
    locale: zhCn
})
app.use(pinia)
app.use(router)
app.mount('#app')
